package com.wealth.sms.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.wealth.system.entity.Corporation;

/**
 * 短信通道管理
 * @author chan
 * modify by chan on 2016-08-16 短信接口升级，接口地址和参数变化
 * modify by chan on 2016-08-17 短信接口升级，加入剩余数量 ，发送最小间隔, 警戒线 ，防止恶意调用
 * 
 */
@Entity
@Table(name="sms_message_channel")
public class MessageChannel implements Serializable{

	private static final long serialVersionUID = 7474905658591910850L;

	private Long id;
	private String sign;		
	private String url;		
	private String userid;
	private String account;
	private String password;
	private String extno;		
	private Integer remainpoint;			/* 剩余数量 */
	private Integer minimumInterval;	/* 发送最小间隔  */
	private Integer warningLine;			/* 警戒线，平台短信最大数量 */
	
	private Date createtime;
	private String creator;		
	private Integer status;
	private Corporation corp;
	
	
	
	/* ---------------- method ----------------*/
	
	public MessageChannel() {}
	
	public MessageChannel(Long id){ 
		this.id = id;
	}

	/* ---------------- getter/setter ----------------*/
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	
	@ManyToOne
	@JoinColumn(name="corp_id")
	public Corporation getCorp() {
		return corp;
	}
	public void setCorp(Corporation corp) {
		this.corp = corp;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getExtno() {
		return extno;
	}

	public void setExtno(String extno) {
		this.extno = extno;
	}

	@Column(name="create_time")
	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getRemainpoint() {
		return remainpoint;
	}

	public void setRemainpoint(Integer remainpoint) {
		this.remainpoint = remainpoint;
	}

	@Column(name="minimum_interval")
	public Integer getMinimumInterval() {
		return minimumInterval;
	}

	public void setMinimumInterval(Integer minimumInterval) {
		this.minimumInterval = minimumInterval;
	}

	@Column(name="warning_line")
	public Integer getWarningLine() {
		return warningLine;
	}

	public void setWarningLine(Integer warningLine) {
		this.warningLine = warningLine;
	}
	
	
	
}
